package com.molihub.service.impl;

import com.molihub.entity.ArticleTag;
import com.molihub.service.ArticleTagService;
import com.molihub.utils.LogUtils;
import org.slf4j.Logger;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: ArticleTagServiceImpl
 * @Description: 文章标签业务层接口实现类
 * @author: xw
 * @date 2020/1/26 21:20
 * @Version: 1.0
 **/
@Service
public class ArticleTagServiceImpl extends BaseService implements ArticleTagService {

    Logger logger = LogUtils.getInstance(UserServiceImpl.class);

    @Override
    public Integer addArticleTag(ArticleTag articleTag) {
        return articleTagMapper.addArticleTag(articleTag);
    }

    @Override
    public Integer deleteArticleTag(ArticleTag articleTag) {
        return articleTagMapper.deleteArticleTag(articleTag);
    }

    @Override
    public List<ArticleTag> getArticleTagsByUserId(Integer userId) {
        return articleTagMapper.getArticleTagsByUserId(userId);
    }

    @Override
    public ArticleTag getArticleTagById(Integer id) {
        return articleTagMapper.getArticleTagById(id);
    }

    @Override
    public Integer updateArticleTag(ArticleTag articleTag) {
        return articleTagMapper.updateArticleTag(articleTag);
    }

    @Override
    public Integer getTagCountByUserId(Integer userId) {
        return articleTagMapper.getTagCountByUserId(userId);
    }
}
